package com.duobao.entity.vo;

import lombok.Getter;

@Getter // 提供获取属性值的getter方法
public enum ResultCodeEnum {
    SUCCESS(200, "操作成功"),
    LOGIN_ERROR(201, "用户名或者密码错误"),
    VALIDATECODE_ERROR(202, "验证码错误"),
    VALIDATECODE_EXPIRED(203, "验证码过期"),
    DATA_ERROR(204, "数据异常"),

    LOGIN_AUTH(403, "用户未登录"),
    USER_NAME_IS_EXISTS(209, "用户已经存在"),
    SYSTEM_ERROR(9999, "您的网络有问题请稍后重试"),

    MASSAGE_ERROR(500, "用户不存在"),
    PASSWORD_ERROR(401, "密码错误"),
    REFUND_ERROR(500, "请不要重复申请"),

    TEXT_ERROR(205,"内容的文本错误");
    private final Integer code;      // 业务状态码
    private final String message;    // 响应消息

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
